package com.qzsoft.zhjd.materiel.modules.materieldata.enmus;

import java.util.ArrayList;
import java.util.List;

import com.qzsoft.zhjd.common.model.SelectListModel;

/**
 * @ClassName MaterielDataSourceEnum
 * @Description 物料数据来源
 * @author linhuawei
 * @since 2021-09-01
 */
public enum MaterielDataSourceEnum {

    WEIGH("0", "称重"), INPUT("1", "补录");

    private String value;
    private String label;

    private MaterielDataSourceEnum(String value, String label) {
        this.label = label;
        this.value = value;
    }

    public String getValue() {
        return value;
    }

    public String getLabel() {
        return label;
    }

    /**
     * @Title getSelectList
     * @Description 获取下拉列表数据
     * @return 下拉列表数据
     */
    public static List<SelectListModel> getSelectList() {
        List<SelectListModel> list = new ArrayList<SelectListModel>();
        SelectListModel model;
        for (MaterielDataSourceEnum item : MaterielDataSourceEnum.values()) {
            model = new SelectListModel();
            model.setValue(item.getValue());
            model.setLabel(item.getLabel());
            list.add(model);
        }
        return list;
    }

}
